package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 87111
 * Date: 2025-06-27
 * Time: 20:09
 */
public class BookList {
    private Book[] books = new Book[10];
    private int bookSize;

    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中",10,"小说");
        this.books[1] = new Book("西游记","吴承恩",20,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",30,"小说");
        this.bookSize = 3;
    }

    public int getBookSize() {
        return bookSize;
    }

    public void setBookSize(int bookSize) {
        this.bookSize = bookSize;
    }

    public String getName(int tmp) {
        return books[tmp].getName();
    }

    public void setBooks(int pos , Book books) {
        this.books[pos] = books;
    }
    public Book[] getBooks() {
        return books;
    }
    public Book getBook(int tmp) {
        return books[tmp];
    }
}
